const AlbumDao = require('../dao/album-dao')
const BaseServices = require('./base-service')

class AlbumServices extends BaseServices {
    constructor(dao = new AlbumDao()) {
        super();
        this.dao = dao
    }

    /**
     * 插入相册
     * @param Album
     * @returns {Promise<unknown>}
     */
    insertAlbum(Album) {
        return this.dao.insertAlbum(Album)
    }

    /**
     * 查询相册列表
     * @returns {Promise<unknown>}
     */
    queryAlbumList(){
        return this.dao.queryAlbumList()
    }

    /**
     * 根据相册id查询相册详情
     * @param id
     * @returns {*}
     */
    queryAlbumById(id) {
        return this.dao.queryAlbumById(id)
    }
}

module.exports = AlbumServices;
